package cn.richard.home.di

import cn.richard.home.api.repository.PictureRepository
import cn.richard.home.viewmodel.PicCategoryViewModel
import cn.richard.home.viewmodel.PicListViewModel
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module

/**
 *
 * @ProjectName: PicApp
 * @Author: wuzhiguo@aiforward.com
 * @CreateDate: 2021/9/1 7:11 下午
 * @Description:
 */

//@Module
//@InstallIn(SingletonComponent::class)
//class NetworkModule {
//
//    @Singleton
//    @Provides
//    fun providePictureService(): PictureService {
//        return PictureService.create()
//    }
//}

val viewModelModule = module {
    viewModel { PicCategoryViewModel(get()) }
    viewModel { PicListViewModel(get()) }
}

val repositoryModule = module {
    single { PictureRepository() }
}

val homeModule = listOf(viewModelModule, repositoryModule)